package service;

import Util.SqlSessionUtil;
import dao.NingboGrowthRateMapper;
import domain.NingboGrowthRate;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class NingboGrowthRateService {
    public List<NingboGrowthRate> selectDataByCounty(String county){
        SqlSession session = SqlSessionUtil.getSession().openSession();

        NingboGrowthRateMapper userOperation = session
                .getMapper(NingboGrowthRateMapper.class);
        List<NingboGrowthRate> list = userOperation.selectByCounty(county);
        session.commit();
        session.close();
        return list;
    }

    public static void main(String[] args) {
        NingboGrowthRateService n = new NingboGrowthRateService();
        System.out.println(n.selectDataByCounty("海曙"));
    }
}
